/*
 * @Author: dingyuwen ding_yuwen@163.com
 * @Date: 2023-02-08 18:03:17
 * @LastEditTime: 2023-10-20 16:01:16
 * @LastEditors: DingYuwen 43669762+DingYuwen@users.noreply.github.com
 * @Description:
 */
import React from 'react';
import ReactDOM from 'react-dom/client';
import { QueryClient, QueryClientProvider } from 'react-query';
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom';
import { FullPageCustomLoader as SuspenseLoading } from './common/components/NewLoading';
import { store } from './store';
import App from './App';

const queryClient = new QueryClient();

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  <Provider store={store}>
    <QueryClientProvider client={queryClient}>
      <BrowserRouter basename={import.meta.env.BASE_URL}>
        <React.Suspense fallback={<SuspenseLoading />}>
          <App />
        </React.Suspense>
      </BrowserRouter>
    </QueryClientProvider>
  </Provider>
);
